-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New Resizer APIs: show, hide and toggle #1838
Conversation
@@ -75,15 +112,21 @@ define(function (require, exports, module) { | |||
* - Left ("left") or right ("right") for horizontal resizing | |||
* | |||
* A resizable element triggers the following events while resizing: | |||
* - panelResizeStarts: When the resize starts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo -- the event is "panelResizeStart"
Looking at the AppInit.htmlReady() calls in FindInFiles.js and JSLintUtils.js, the code looks almost identical. Is there any way to automate that? Or at least simplify it down to a few parameters that can be passed to an API call? |
I think we could find some solution, but I'm afraid it won't be as flexible as I'd like... Maybe we could translate this to the discussion in the final pull request (once we can see all we'd need) to see how that API could look like? |
Done with initial code review |
@redmunds I was thinking about the API for initializing the panels. I think most things could be automated if we allow the I think this could make it way cleaner for the regular cases. What do you think? Does it make sense to store the size preferences in By the way, I didn't realize you hadn't finished the review when I submitted the changes. Sorry about that. Please, tell me if there's anything else you'd want to see in here. |
@jbalsas I agree that storing the sizes in No problem about checking in changes while I'm still reviewing. I got side-tracked and should not have taken so long. |
|
||
// We wait 100ms to remove the resizer container to capture a mousedown | ||
// on the container that would account for double click | ||
setTimeout(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've been using window.setTimeout
to minimize our use of globals in our jslint config.
@jasonsanjose Thanks for pointing it out. Fixed! @peterflynn We're getting close to the final refactor step. I'll make sure to carefully go through those changes. As you say, hopefully it won't be too hard... @redmunds I already moved the size preferences to |
@jbalsas Yes, I think I'll wait until we close down this sprint to merge any more changes. |
Looks good. Merging. |
New Resizer APIs: show, hide and toggle
Hi,
This is a pull request prior to the sidebar refactorization proposed in #1811
It creates three new APIs
show
hide
andtoggle
on theutils/Resizer
module to change the visibility of resizable elements.It also scans a new class
collapsable
on the elements to trigger the toggle function when double clicking on the resizer element.The
show
andhide
APIs are meant to decouple the visualization panels from the actual working of the Modules. For example, once the statusbar indicator actions are implemented, the jslint results panel could be shown or hidden while keeping the scan running.